#!/bin/bash
#
# name: lock_client_account.sh
# auth: doctype <https://t.me/ndiey>
# desc:
##
clear

if [ "${EUID}" -ne 0 ]; then
    echo "You need to run this script as root" && exit 1
fi

read -p "Enter username: " UserName
egrep "^$UserName" /etc/passwd >/dev/null
if [ $? -ne 0 ]; then
    echo "Nama pengguna tidak ditemukan!" && exit 1
fi
passwd -l $UserName

echo "==================== [ LOCK CLIENT PASSWORD ]"
echo " Successfully lock user password"
echo "---------------------------------------------"
echo "Copyright 2021 Cybertize, Allright Reserved."
echo "============================================="
